home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 May / Ahoy_Magazine_87-05_1987_Double_L_Side_B.d64 / smooth curve.txt < prev    next >
Text File  |  2022-10-26  |  2KB  |  74 lines

  1. SMOOTH CURVES
  2.  
  3. by Richard Bain
  4.  
  5. For those of you interested in this
  6. program without needing to know its
  7. history, smooth'curve is an advanced
  8. connect the dots program. It draws a
  9. line between all the points entered
  10. by the user, in the same order as
  11. they were entered. However, instead
  12. of drawing a straight line between
  13. the points, it uses an advanced
  14. mathematical technique know as cubic
  15. splines to draw as smooth a curve as
  16. possible.
  17.  
  18. To demonstrate this, a fun drawing
  19. program is on this disk. Use the
  20. cursor keys to move a pointer around
  21. the graphics screen. Press <RETURN>
  22. for each point in the path to be
  23. drawn. When all points are entered,
  24. press <space> to start drawing the
  25. curve.
  26.  
  27. Smooth'curve was originally a Fortran
  28. program that was translated to Pascal
  29. and then to COMAL. The Pascal
  30. version, along with a 6 page article
  31. with pictures, is in PC Tech Journal,
  32. August 1986. Those of you with access
  33. to that magazine may be surprised at
  34. how close the COMAL and Pascal
  35. listings actually are. There are only
  36. two major differences. First, the
  37. Pascal version has all the procedures
  38. listed before the main section of the
  39. program. COMAL can be written this
  40. way, but most COMAL programmers
  41. prefer to put the main section of the
  42. program before the procedures. The
  43. second main difference is in the
  44. names of the keywords used in the
  45. graphics commands.
  46.  
  47. COMAL 0.14 has two more differences
  48. from the Pascal version. COMAL 0.14
  49. doesn't allow for nested procedures
  50. or the passing of arrays by value.
  51. Therefore, procedures nested in the
  52. Pascal version have been moved
  53. outside in the COMAL 0.14 version.
  54. The procedure headers were also
  55. changed to make all arrays passed by
  56. reference. These two changes were not
  57. needed in COMAL 2.0. Even with these
  58. minor changes, the structure of both
  59. the COMAL and Pascal versions of
  60. smooth'curve are the same.
  61.  
  62. Further Reference:
  63.  
  64. Smooth Curves
  65. by Michael A. Covington
  66.  
  67. page 110, August 1986
  68. PC Tech Journal
  69.  
  70. The World Trade Center
  71. Suite 211
  72. Baltimore, MD 21202
  73. $29.97 per year subscription.
  74.